Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add GPL exception for Vendure plugins #3280

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

michaelbromley
Copy link
Member

@michaelbromley michaelbromley commented Dec 18, 2024

Description

Because Vendure uses the GPL v3.0 license, the common interpretation based on GNU FAQ (single combined program) would suggest that any plugins must also be GPL licensed.

However, it is our opinion that plugins should not be subject to this restriction. In our opinion, the GPL requirements should apply to the Vendure code itself (i.e., the files in this repo). Plugin code is not typically distributed as a combined program - it is distributed as a stand-alone package that only consumes the public APIs of Vendure.

Background

A good general background on the topic of linking & derived works as applied to the GPL can be found here: GNU General Public License: Linking and derived works. In short: there is controversy and lack of clarity on what constitutes a "derived work" and therefore whether programs which make use of GPL libraries must themselves be licensed under the GPL.

To resolve this lack of clarity, many projects make explicit exceptions to the GPL terms, which make clear how the library may be used.

There are many examples of GPL projects/licenses which include special exceptions.

This stackexchange answer gives a good summary of the intent of the classpath exception:

Here is where the Classpath Exception is invaluable. It clearly states that the code under the license is (L)GPL, but anything using that code can follow whatever license they'd like. No ifs, ands, or buts. If you change the core code (e.g. fixing bugs), you do still have to release those changes as part of the GPL. But using does NOT infect you...
So, to me, the Classpath Exception is a much different than LGPL. It is a legally clean way to draw a bright line allowing non-GPL use of GPL or LGPL source code or libraries.

which in turn features a reply from one of the creators of this license, Anthony Green

IANAL, but I am one of the creators of the Classpath Exception, and this is the right answer. The Exception was created to support AOT compiled embedded use cases where developers would be statically linking binaries (with gcj in our case). We needed something like the libgcc license, so I wrote the first version of the Classpath Exception based on that. It has since matured, but the spirit is the same.

Here is another article from Vaultinum, a firm specializing in digital IP: The GPL and its Unique GPL Classpath Exception: what does it mean?

Libraries, by design, are tools intended to be used by a broader range of software. Their primary purpose is to offer functionality to be leveraged by various applications. When a library is GPL-licensed, its strict licensing can deter its adoption, as not every developer or company wishes to open-source their entire application under the GPL.

The GPL Classpath Exception bridges this gap. It allows libraries to remain free and open (thus benefiting from community contributions) while still being attractive to a broader spectrum of software projects that might have otherwise avoided it due to licensing concerns.

The GPL Classpath Exception offers several notable benefits:
1. Greater Adoption of the Library: Libraries licensed with the GPL Classpath Exception are more attractive for a wide range of developers, including those working on proprietary software, as they don't impose GPL's stringent redistribution requirements.
2. Maintaining Software Freedoms: Despite the Classpath Exception, the library itself continues to be governed by the GPL.
This means that any changes or improvements to the library must be open sourced, thereby preserving the essence of software freedom for the library.
3. Flexibility for Developers: Developers can choose to either use the library under the strict GPL (without the Classpath
Exception) or with the Classpath Exception, depending on their project's needs.
4. Protecting Proprietary Interests: Businesses can integrate powerful GPL libraries into their proprietary solutions without risking their intellectual property or business model.

The above quotes about the classpath exception express well the intent behind this PR.

GPL v3.0 section 7

Since the specific "classpath exception" license is specific to GPL v2.0, and we are using GPL v3.0, we will not use that exact license. Instead, we will use a mechanism explicitly built in to GPL v3.0 in section 7 "Additional Terms":

  1. Additional Terms.
    “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

A discussion of the intent behind section 7 can be found in the FSF archive article Opinion on Additional Terms

We have licensed some of our own software under GPLv2 with permissive exceptions that allow combination with non-free code, and that allow removal of those permissions by downstream recipients; similarly, LGPLv2.1 is in essence a permissive variant of GPLv2, and it permits relicensing under the GPL. We have generalized these practices in section 7.

An example of section 7 being used to allow non-GPL plugins is the Roundcube license

This PR applies the same principle to our license.

Our Implementation

This PR builds on the examples set by other projects by using GPL v3.0 section 7 in this way:

Additional permission under GNU GPL version 3 section 7:

An additional exception under section 7 of the GPL is included in the plugin-exception.txt file,
which allows you to distribute Vendure plugins (i.e. extensions) under a different license.

The text in the plugin-exception.txt file is based on the pattern of the GCC Runtime Library Exception, defining the distinction between "Vendure Core" and "Plugins", and then granting additional permissions on "Plugins".

The PR also includes updates to the plugin FAQ and documentation to bring them into line with this new exception.

This change will explicitly allow people to license Vendure plugins under any license they choose, both open source and proprietary.

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Dec 18, 2024 4:55pm

@michaelbromley michaelbromley merged commit 0bf4186 into master Dec 30, 2024
33 checks passed
@michaelbromley michaelbromley deleted the license-plugin-exception branch December 30, 2024 12:35
@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant